function PageNavigation(){
    
    // Can be 1 or 2
    var lastHomeScreen = 1;
    var activePage = "";
    
    this.goToHome = function(successFunction){
        switch(lastHomeScreen){
            case 1:
                $('#content').load('home.html?ts=' + Date.now(), successFunction);
                activePage = "home.html";
                break;
            case 2:
                $('#content').load('home2.html?ts=' + Date.now(), successFunction);
                activePage = "home2.html";
                break;
        }
    };
    
    this.goTo = function(filename, successFunction){
        switch(filename){
            case 'home.html':
                lastHomeScreen = 1;
                break;
            case 'home2.html':
                lastHomeScreen = 2;
                break;
        }
        setLoadState = false;
        $('#content').load(filename + '?ts=' + Date.now(), successFunction);
        activePage = filename;
    };
    
    this.swipeRight = function(successFunction){
        if(activePage == "home.html" || activePage == "home2.html"){
            if(lastHomeScreen != 1){
                lastHomeScreen = 1;
                this.goToHome(successFunction);
            }
        }
    }
    this.swipeLeft = function(successFunction){
        if(activePage == "home.html" || activePage == "home2.html"){
            if(lastHomeScreen != 2){
                lastHomeScreen = 2;
                this.goToHome(successFunction);
            }
        }
    }
    
}